#!/usr/bin/env python
# -*- coding:utf-8 -*-
from flask import jsonify
from flask_restful import Resource

from service.verifyCodeService import VerifyCodeService
from utils.response_code import RET


class VerifyCodeOtherResource(Resource):
	@classmethod
	def create_verify_code(cls):
		result = VerifyCodeService.create_verify_code()

		if result['code'] != RET.OK:
			return jsonify(code=result['code'], message=result['message'], data=result['data'])

		return jsonify(code=result['code'], message=result['message'], data=result['data'])
